package com.fy.spring.serivce.impl;

import com.fy.spring.serivce.PaymentService;
import org.springframework.stereotype.Service;

@Service
public class PaymentServiceImpl implements PaymentService {

    @Override
    public String timeout(int second) {
        try {
            Thread.sleep(second * 1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return "程序运行" + second + "s";
    }

    @Override
    public String makeException() {
        int a = 10 / 0;
        return null;
    }

}
